#!/bin/sh

# delete the index
curl -XDELETE "http://localhost:9200/lamppost/"
echo

# create the index
curl -XPUT "http://localhost:9200/lamppost/"
echo

curl -XPUT -d @auditEvent-mapping.json \
	"http://localhost:9200/lamppost/auditEvent/_mapping"
echo

curl -XPUT -d @patientIdentity-mapping.json \
	"http://localhost:9200/lamppost/patientIdentity/_mapping"
echo

curl -XPUT -d @documentContent-mapping.json \
	"http://localhost:9200/lamppost/documentContent/_mapping"
echo

curl -XPUT -d @documentEntry-mapping.json \
	"http://localhost:9200/lamppost/documentEntry/_mapping"
echo

curl -XPUT -d @folder-mapping.json \
	"http://localhost:9200/lamppost/folder/_mapping"
echo

curl -XPUT -d @submissionSet-mapping.json \
	"http://localhost:9200/lamppost/submissionSet/_mapping"
echo

curl -XPUT -d @patient-mapping.json \
	"http://localhost:9200/lamppost/patient/_mapping"
echo

#curl -XGET "http://localhost:9200/lamppost/_mapping"
echo
